package Json;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

import Storage.Buddy;

public class LocationJson {
	public static Buddy process(String jsonText) throws JSONException {
		Buddy buddy = new Buddy();
		JSONObject object = new JSONObject();
		object = (JSONObject) new JSONTokener(jsonText).nextValue();
		buddy.setLatitude(object.getString("lat"));
		buddy.setLongitude(object.getString("log"));		
		buddy.setPhoneNumber(object.getString("phone"));
		return buddy;
	}

}

